package com.mmp.main.entity;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * The persistent class for the hospital database table.
 *
 */
@Entity
@Table(name = "hospital")
@NamedQuery(name = "Hospital.findAll", query = "SELECT h FROM Hospital h")
public class Hospital implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	private Integer id;

	private String name;

	@Column(name = "health_center")
	private Boolean healthCenter;

	@ManyToOne
	@JoinColumn(name = "site_id")
	private Site site;

	private Boolean status;

	/*
	 * // bi-directional many-to-one association to HospitalDepartment
	 * 
	 * @LazyCollection(LazyCollectionOption.FALSE)
	 * 
	 * @OneToMany(mappedBy = "hospital")
	 * 
	 * @Fetch(value = FetchMode.SUBSELECT) private List<HospitalDepartment>
	 * hospitalDepatments;
	 * 
	 * // bi-directional many-to-one association to HospitalDevice
	 * 
	 * @OneToMany(mappedBy = "hospital")
	 * 
	 * @Fetch(value = FetchMode.SUBSELECT) private List<HospitalDevice>
	 * hospitalDevices;
	 * 
	 * // bi-directional many-to-one association to User
	 * 
	 * @OneToMany(mappedBy = "hospital")
	 * 
	 * @Fetch(value = FetchMode.SUBSELECT) private List<User> users;
	 */

	public Hospital() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getHealthCenter() {
		return healthCenter;
	}

	public void setHealthCenter(Boolean healthCenter) {
		this.healthCenter = healthCenter;
	}

	public Site getSite() {
		return site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}
}
